<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { ref } from 'vue'
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';

import { useCommonStore } from '@/stores/common';
const commonStore = useCommonStore()

dayjs.locale('zh-cn');

const locale = ref(zhCN)
</script>

<template>
  <!-- #dcdcdc -->
  <!-- #eee -->
  <a-config-provider :locale="locale" :theme="{
    token: {
      borderRadius: 2,
      colorBorder: '#dcdcdc',
      colorBgLayout: '#eee',
      colorBorderSecondary: '#ececec'

    }
  }">
  
    <RouterView v-slot="{ Component }">
      <Transition name="fade" mode="out-in">
        <keep-alive :include="commonStore.includeList">
          <component :is="Component" />
        </keep-alive>
      </Transition>
    </RouterView>
  </a-config-provider>
</template>

<style>
:root {
  --primary-color: #108d02;
  --danger-color: #ff5733;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;

}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
</style>
